package com.student.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.directwebremoting.annotations.DataTransferObject;
import org.directwebremoting.annotations.RemoteProperty;

/**
 * ParentInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Parent_Info", schema = "dbo", catalog = "StudentManager")
@DataTransferObject
public class ParentInfo implements java.io.Serializable {

	// Fields

	private Long parentId;
	private Student student;
	private PoliticsStatus politicsStatus;
	private String parentName;
	private String parentMobile;
	private String relation;
	private Boolean sex;
	private String job;

	// Constructors

	/** default constructor */
	public ParentInfo() {
	}

	/** minimal constructor */
	public ParentInfo(Long parentId, String parentName, String relation,
			Boolean sex) {
		this.parentId = parentId;
		this.parentName = parentName;
		this.relation = relation;
		this.sex = sex;
	}

	/** full constructor */
	public ParentInfo(Long parentId, Student student,
			PoliticsStatus politicsStatus, String parentName,
			String parentMobile, String relation, Boolean sex, String job) {
		this.parentId = parentId;
		this.student = student;
		this.politicsStatus = politicsStatus;
		this.parentName = parentName;
		this.parentMobile = parentMobile;
		this.relation = relation;
		this.sex = sex;
		this.job = job;
	}

	// Property accessors
	@Id
	@Column(name = "Parent_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getParentId() {
		return this.parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Student_id")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Politics_Status_id")
	public PoliticsStatus getPoliticsStatus() {
		return this.politicsStatus;
	}

	public void setPoliticsStatus(PoliticsStatus politicsStatus) {
		this.politicsStatus = politicsStatus;
	}

	@Column(name = "Parent_Name", nullable = false, length = 20)
	public String getParentName() {
		return this.parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	@Column(name = "Parent_Mobile", length = 20)
	public String getParentMobile() {
		return this.parentMobile;
	}

	public void setParentMobile(String parentMobile) {
		this.parentMobile = parentMobile;
	}

	@Column(name = "Relation", nullable = false, length = 20)
	public String getRelation() {
		return this.relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	@Column(name = "Sex", nullable = false)
	public Boolean getSex() {
		return this.sex;
	}

	public void setSex(Boolean sex) {
		this.sex = sex;
	}

	@Column(name = "Job", length = 50)
	public String getJob() {
		return this.job;
	}

	public void setJob(String job) {
		this.job = job;
	}

}